package net.fornwall.eclipsecoder.javasupport.preferences;

import net.fornwall.eclipsecoder.languages.LanguageSupport;

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;

/**
 * Class used to initialize default preference values.
 */
public class PreferenceInitializer extends AbstractPreferenceInitializer {

    /**
     * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
     */
    @Override
	public void initializeDefaultPreferences() {
        IPreferenceStore store = JavaSupportPlugin.getInstance().getPreferenceStore();

        store.setDefault(JavaSupportPlugin.CODE_TEMPLATE_PREFERENCE,
                "public class " + LanguageSupport.CLASSNAME_TAG + " {\n\n"
                        + "\tpublic " + LanguageSupport.RETURNTYPE_TAG + " "
                        + LanguageSupport.METHODNAME_TAG + "(" + LanguageSupport.METHODPARAMS_TAG
                        + ") {\n" + "\t\treturn " + LanguageSupport.DUMMYRETURN_TAG + ";\n"
                        + "\t}\n\n" + "}\n");
    }

}
